import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("lang_pkey", ["id"], { unique: true })
@Entity("lang", { schema: "public" })
export class Lang {
  @PrimaryGeneratedColumn({ type: "integer", name: "id" })
  id: number;

  @Column("character varying", {
    name: "code",
    length: 30,
    default: () => "''",
  })
  code: string;

  @Column("json", { name: "values", nullable: true })
  values: object | null;

  @Column("boolean", { name: "enable", default: () => "true" })
  enable: boolean;

  @Column("smallint", { name: "sort", default: () => "0" })
  sort: number;

  @Column("integer", { name: "create_time", default: () => "0" })
  createTime: number;

  @Column("integer", { name: "update_time", default: () => "0" })
  updateTime: number;
}
